# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Jean-Louis Fuchs <jean-louis.fuchs@adfinis-sygroup.ch>
pkgname=ecasound
pkgver=2.9.3
pkgrel=3
pkgdesc="Textmode multitrack audio processing"
url="https://ecasound.seul.org/ecasound/"
arch="all !s390x" # Testsuite fails
license="GPL-2.0-or-later"
makedepends="alsa-lib-dev readline-dev ncurses-dev
	mpg123-dev lame-dev libsndfile-dev libsamplerate-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://ecasound.seul.org/download/ecasound-$pkgver.tar.gz
	0001-ecasignalview.cpp-always-use-s-style-format-for-prin.patch
	"

prepare() {
	default_prepare
	update_config_sub
	update_config_guess
}

build() {
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

check() {
	make check
}

sha512sums="
4f70e6f54cd05194a4ffe80905e7488d16d32d684c87736dfdac7b3aebf3d20cbf417964d75e00e781f6f0614b8b699061c69fcbf7e1761d66ce1abfcd5f1140  ecasound-2.9.3.tar.gz
fa2d3305b16de3c5e674c94d6e29465c78e9b9751b1e86a7761d839dd5e86d9fa8fb97b228394406d48cfc9329b8378914a618c37b300273f2467dad6dfeca1d  0001-ecasignalview.cpp-always-use-s-style-format-for-prin.patch
"
